@echo off
cd /d %~dp0
rem 创建目录
if not exist .\terrasavr mkdir .\terrasavr
if not exist .\terrasavr\js mkdir .\terrasavr\js
if not exist .\terrasavr\img mkdir .\terrasavr\img
if not exist .\terrasavr\lib mkdir .\terrasavr\lib
if not exist .\terrasavr\lang mkdir .\terrasavr\lang
rem 下载文件
tools\wget.dat -O ./terrasavr/index.html               http://xinronghui.cn:9090/
tools\wget.dat -O ./terrasavr/img/items.png            https://yal.cc/r/terrasavr/img/items.png
tools\wget.dat -O ./terrasavr/js/script.js                https://yal.cc/r/terrasavr/script.js
tools\wget.dat -O ./terrasavr/lang/lang.zip            https://yal.cc/r/terrasavr/lang/lang.zip
tools\wget.dat -O ./terrasavr/lib/FileSaver.min.js     https://yal.cc/r/terrasavr/lib/FileSaver.min.js
tools\wget.dat -O ./terrasavr/lang/pako_inflate.min.js https://yal.cc/r/terrasavr/lang/pako_inflate.min.js
tools\wget.dat -O ./terrasavr/img/buffs.png            https://yal.cc/r/terrasavr/img/buffs.png
tools\wget.dat -O ./terrasavr/img/color.png            https://yal.cc/r/terrasavr/img/color.png
tools\wget.dat -O ./terrasavr/img/nitems.png           https://yal.cc/r/terrasavr/img/nitems.png
tools\wget.dat -O ./terrasavr/img/shadow.png           https://yal.cc/r/terrasavr/img/shadow.png
tools\wget.dat -O ./terrasavr/img/side.png             https://yal.cc/r/terrasavr/img/side.png
tools\wget.dat -O ./terrasavr/img/visual.png           https://yal.cc/r/terrasavr/img/visual.png
tools\wget.dat -O ./terrasavr/img/og.png               https://yal.cc/r/terrasavr/img/og.png
tools\wget.dat -O ./terrasavr/img/overlay.png          https://yal.cc/r/terrasavr/img/overlay.png
rem 更新语言文件包
tools\7z.dat a -tzip %~dp0terrasavr\lang\lang.zip  Terraria.Localization.Content.zh-Hans.Items.json
tools\re.dat %~dp0terrasavr/js/script.js
pause